home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-22 | 665 b | 33 lines | [TEXT/ttxt] |
- --<<<
-
- class BitArray (MemoryObject)
- inst vars
- bitSize
- class methods
- method afterInit self #rest args -> (
- apply nextMethod self args
- process (new loader) "c-api"
- )
- end
-
-
- method init self {class BitArray} #rest args #key numBits:(16) -> (
- if (mod numBits 8 !== 0) do
- report generalError #("numBits must be a multiple of 8\n")
-
- apply nextMethod self initialSize:((numBits / 8) as Integer) args
- self.bitSize := numBits
- clear self
- )
-
- method localEqual self {class BitArray} other -> (
- bitequal self other
- )
-
- method prin self {class BitArray} how strm -> (
- for i := 0 to (self.bitSize - 1) do
- writeString strm ((getbit self i) as String)
- )
-
- -->>>
-